import request from '@/utils/request'

export function dictTreeData(query) {
  return request({
    url: `${process.env.VUE_APP_MODULE_ADMIN_API}/api/system/dict/treeData`,
    method: 'post',
    data: query
  })
}

export function dictLoad(query) {
  return request({
    url: `${process.env.VUE_APP_MODULE_ADMIN_API}/api/system/dict/load`,
    method: 'get',
    params: query
  })
}

export function dictSave(query) {
  return request({
    url: `${process.env.VUE_APP_MODULE_ADMIN_API}/api/system/dict/save`,
    method: 'post',
    data: query
  })
}

export function dictDelete(query) {
  return request({
    url: `${process.env.VUE_APP_MODULE_ADMIN_API}/api/system/dict/delete`,
    method: 'post',
    data: query
  })
}

export function dictGroup(query) {
  return request({
    url: `${process.env.VUE_APP_MODULE_ADMIN_API}/api/system/dict/dictGroup`,
    method: 'get',
    params: query
  })
}
